#pragma once

#if defined(__linux__)
#include "linux/coroutine.h"
#else
#include "windows/coroutine.h"
#endif // linux

#include <stdexcept>
#include <string>
inline std::size_t getStackSize() { return coroutine::STACK_SIZE; }

class CoroCancelException : std::runtime_error {
public:
  explicit CoroCancelException(const std::string &reason)
      : runtime_error(reason.c_str()) {}

  explicit CoroCancelException(const char *reason) : runtime_error(reason) {}
};
